#!/bin/bash
# $1 is the command that produces the list of file
# i.e. "ls *.eps"
# bash for loop

    for f in $( ls $HOME/humanroot/utils/MGscripts/custom_python_MG_code/* ); do
        echo "substituting "$f
	filename=${f##*/}
	echo "searching "$filename
	find . -iname "$filename" -exec cp -v "$f" $1 {} \;        
#	find . -iname "$filename" -exec echo "found " $1 {} \;
    done


#find . -iname "$1" -exec cp -v ~/public_html/python_MG5_customized/comimon_run_interface.py $1 {} \;
